/*
 * FileSize.java
 *
 * Created on December 10, 2006, 5:39 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package eu.somatik.somaftp.logic;

/**
 *
 * @author francisdb
 */
public class FileSize implements Comparable<FileSize>{
    
    private long bytes;
    
    /** Creates a new instance of FileSize */
    public FileSize(long bytes) {
        this.bytes = bytes;
    }

    public String toString() {
        return FileSizeFormatter.format(bytes);
    }

    public int compareTo(FileSize o) {
        return (int)(bytes - o.bytes);
    }
    

    
}
